public class StringDemo2 {
    /**
     * @author dengjiangming
     * @date 2025-06-19
     * @version 1.0.0
     */


    //将字符串转化为字符数组，以特定的格式构造字符串
    public static void main(String[] args) {
        String s = "hello";
        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            System.out.println(chars[i]);
        }

        String s1 = String.format("%d-%d-%d",2025,6,19);
        System.out.println(s1);
    }
}
